package mid.class1;

/**
 * https://leetcode.cn/problems/rotate-string/description/
 * 旋转字符串
 * 解题思路：
 * 1.拼接字符串，判断是否包含
 */
public class Code06_RotateString {
    public static void main(String[] args) {
        String str = "abcde";
        String str2 = "cdeab";
        boolean ans = rotateString(str, str2);
        System.out.println("index = " + ans);
    }

    public static boolean rotateString(String s, String goal) {
        return s.length() == goal.length() && (s + s).contains(goal);
    }
}
